package com.wave.mapper;

import com.wave.entity.Deliver;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeliverMapper {

    int createDeliver(Deliver deliver);

    int alterDeliverType(@Param("dId")int dId, @Param("dType")String dType);
    int changeLafDeliver(@Param("dTarget")int dTarget, @Param("dType")String dType);
    int otherDeliverChange(@Param("dId")int dId, @Param("dType")String dType);

    List<Deliver>getMyDeliver(String dAuthor);
    List<Deliver> list(@Param("dTarget")String dTarget, @Param("dAuthorName")String dAuthorName,
                       @Param("dType")String dType,
                       @Param("pageStart")int pageStart, @Param("pageSize")int pageSize);
    List<Deliver>getLAFDeliver(int lafId);
    int selectLAFDeliver(int lafId);

    Deliver getDeliverDetail(int dId);
    int getDetailTarget(int dId);

    String getType(int dId);

    int countDel(@Param("dTarget")String dTarget, @Param("dAuthorName") String dAuthorName);
}
